package com.java.admin.controller;


import com.java.admin.pojo.User;
import com.java.admin.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/adminusers")
public class AdminController {

    @Autowired
    private EmpService empService;

    /**
     * 登录验证
     * @param username
     * @param pwd
     * @return
     */
    @RequestMapping("/islogin")
    public @ResponseBody
    boolean islogin(String username, String pwd){
        if (username==null||pwd==null){
            return false;
        }
        boolean empLogin=empService.selectLogin(username,pwd);

        return empLogin;
   }
}
